package com.ggh.entity;

import com.baomidou.mybatisplus.annotation.FieldStrategy;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.ggh.util.TreeEntity;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
@Data
@TableName("sys_menu")
public class Menu extends TreeEntity<Menu> {

    private static final long serialVersionUID = 1L;

    private String name;

    private String icon;

    /**
     * 链接地址
     */
    @TableField(strategy= FieldStrategy.IGNORED)
    private String href;

    /**
     * 打开方式
     */
    @TableField(strategy= FieldStrategy.IGNORED)
    private String target;

    /**
     * 是否显示
     */
    @TableField(value="is_show",strategy= FieldStrategy.IGNORED)
    private Boolean isShow;

    @TableField("bg_color")
    private String bgColor;

    /**
     * 权限标识
     */
    @TableField(strategy= FieldStrategy.IGNORED)
    private String permission;

    @TableField(exist = false)
    private Integer dataCount;



    @Length(min = 0, max = 1000, message = "icon长度必须介于 1 和 1000 之间")
    public String getIcon() {
        return icon;
    }

}
